import request from '@/utils/request'
// * 获取部门列表
export const getDepartment = () => {
  return request({
    url: '/company/department'
  })
}

// 根据ID查询部门详情
export const getDepartDetail = (id) => {
  return request({
    url: `/company/department/${id}`
  })
}

// 根据ID修改部门详情
export const updateDepartment = (data) => {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}

// 根据id删除部门
export const delDepartment = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
